<%@ page contentType="text/html;charset=UTF-8" %> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>

<h3>Klasy nauczyciela: </h3>

<h6>Klasy do których należy nauczyciel:</h6>

<c:forEach items="${teacherClasses}" var="teacherClass" varStatus="status">

<a href="<c:url value="/admin/teachers/classes/delete" />?id=${param.id}&classId=${teacherClass.classId}" >
		<img src="<c:url value="/resources/delete.gif" />" /></a>
<a href="<c:url value="/admin/class" />?id=${teacherClass.classId}">${teacherClass.className}</a><br />
</c:forEach>

<h6>Dodaj nauczyciela do klasy:</h6>
<form:form commandName="teacherClassesForm">
	<form:errors path="classID" cssClass="error_box" /><br />
	<form:select path="classID">
		<form:option value="" label="Wybierz klasę" />
		<form:options items="${classesOptions}"/>
	</form:select> <input type="submit" value="Dodaj" />
</form:form>